package com.tianqi.familymap.adapter

import androidx.fragment.app.Fragment
import androidx.viewpager2.adapter.FragmentStateAdapter
import com.tianqi.familymap.base.BaseFragment
import com.tianqi.familymap.entry.MainActivity

class SimpleAdapter(private val activity: MainActivity, private val list: List<BaseFragment>) : FragmentStateAdapter(activity) {
    override fun getItemCount(): Int {
        return list.size
    }

    override fun createFragment(position: Int): Fragment {
        return list[position]
    }
}